3.7.71 \(\int \frac {1}{\sqrt {2-3 \sec (c+d x)} \sqrt {\sec (c+d x)}} \, dx\) [671]

Optimal. Leaf size=108 \[ \frac {E\left (\left .\frac {1}{2} (c+d x)\right |-4\right ) \sqrt {2-3 \sec (c+d x)}}{d \sqrt {3-2 \cos (c+d x)} \sqrt {\sec (c+d x)}}+\frac {3 \sqrt {3-2 \cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |-4\right ) \sqrt {\sec (c+d x)}}{d \sqrt {2-3 \sec (c+d x)}} \]

[Out]

(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticE(sin(1/2*d*x+1/2*c),2*I)*(2-3*sec(d*x+c))^(1/2)/d/(3-
2*cos(d*x+c))^(1/2)/sec(d*x+c)^(1/2)+3*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticF(sin(1/2*d*x+1
/2*c),2*I)*(3-2*cos(d*x+c))^(1/2)*sec(d*x+c)^(1/2)/d/(2-3*sec(d*x+c))^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.14, antiderivative size = 108, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {3947, 3941, 2734, 2732, 3943, 2742, 2740} \begin {gather*} \frac {3 \sqrt {3-2 \cos (c+d x)} \sqrt {\sec (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |-4\right )}{d \sqrt {2-3 \sec (c+d x)}}+\frac {\sqrt {2-3 \sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |-4\right )}{d \sqrt {3-2 \cos (c+d x)} \sqrt {\sec (c+d x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[1/(Sqrt[2 - 3*Sec[c + d*x]]*Sqrt[Sec[c + d*x]]),x]

[Out]

(EllipticE[(c + d*x)/2, -4]*Sqrt[2 - 3*Sec[c + d*x]])/(d*Sqrt[3 - 2*Cos[c + d*x]]*Sqrt[Sec[c + d*x]]) + (3*Sqr
t[3 - 2*Cos[c + d*x]]*EllipticF[(c + d*x)/2, -4]*Sqrt[Sec[c + d*x]])/(d*Sqrt[2 - 3*Sec[c + d*x]])

Rule 2732

Int[Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[2*(Sqrt[a + b]/d)*EllipticE[(1/2)*(c - Pi/2
+ d*x), 2*(b/(a + b))], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && GtQ[a + b, 0]

Rule 2734

Int[Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Dist[Sqrt[a + b*Sin[c + d*x]]/Sqrt[(a + b*Sin[c +
 d*x])/(a + b)], Int[Sqrt[a/(a + b) + (b/(a + b))*Sin[c + d*x]], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 -
 b^2, 0] &&  !GtQ[a + b, 0]

Rule 2740

Int[1/Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/(d*Sqrt[a + b]))*EllipticF[(1/2)*(c - P
i/2 + d*x), 2*(b/(a + b))], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && GtQ[a + b, 0]

Rule 2742

Int[1/Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Dist[Sqrt[(a + b*Sin[c + d*x])/(a + b)]/Sqrt[a
+ b*Sin[c + d*x]], Int[1/Sqrt[a/(a + b) + (b/(a + b))*Sin[c + d*x]], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a
^2 - b^2, 0] &&  !GtQ[a + b, 0]

Rule 3941

Int[Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)]/Sqrt[csc[(e_.) + (f_.)*(x_)]*(d_.)], x_Symbol] :> Dist[Sqrt[a +
 b*Csc[e + f*x]]/(Sqrt[d*Csc[e + f*x]]*Sqrt[b + a*Sin[e + f*x]]), Int[Sqrt[b + a*Sin[e + f*x]], x], x] /; Free
Q[{a, b, d, e, f}, x] && NeQ[a^2 - b^2, 0]

Rule 3943

Int[Sqrt[csc[(e_.) + (f_.)*(x_)]*(d_.)]/Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[Sqrt[d*C
sc[e + f*x]]*(Sqrt[b + a*Sin[e + f*x]]/Sqrt[a + b*Csc[e + f*x]]), Int[1/Sqrt[b + a*Sin[e + f*x]], x], x] /; Fr
eeQ[{a, b, d, e, f}, x] && NeQ[a^2 - b^2, 0]

Rule 3947

Int[1/(Sqrt[csc[(e_.) + (f_.)*(x_)]*(d_.)]*Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)]), x_Symbol] :> Dist[1/a,
 Int[Sqrt[a + b*Csc[e + f*x]]/Sqrt[d*Csc[e + f*x]], x], x] - Dist[b/(a*d), Int[Sqrt[d*Csc[e + f*x]]/Sqrt[a + b
*Csc[e + f*x]], x], x] /; FreeQ[{a, b, d, e, f}, x] && NeQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \frac {1}{\sqrt {2-3 \sec (c+d x)} \sqrt {\sec (c+d x)}} \, dx &=\frac {1}{2} \int \frac {\sqrt {2-3 \sec (c+d x)}}{\sqrt {\sec (c+d x)}} \, dx+\frac {3}{2} \int \frac {\sqrt {\sec (c+d x)}}{\sqrt {2-3 \sec (c+d x)}} \, dx\\ &=\frac {\sqrt {2-3 \sec (c+d x)} \int \sqrt {-3+2 \cos (c+d x)} \, dx}{2 \sqrt {-3+2 \cos (c+d x)} \sqrt {\sec (c+d x)}}+\frac {\left (3 \sqrt {-3+2 \cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {-3+2 \cos (c+d x)}} \, dx}{2 \sqrt {2-3 \sec (c+d x)}}\\ &=\frac {\sqrt {2-3 \sec (c+d x)} \int \sqrt {3-2 \cos (c+d x)} \, dx}{2 \sqrt {3-2 \cos (c+d x)} \sqrt {\sec (c+d x)}}+\frac {\left (3 \sqrt {3-2 \cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {3-2 \cos (c+d x)}} \, dx}{2 \sqrt {2-3 \sec (c+d x)}}\\ &=\frac {E\left (\left .\frac {1}{2} (c+d x)\right |-4\right ) \sqrt {2-3 \sec (c+d x)}}{d \sqrt {3-2 \cos (c+d x)} \sqrt {\sec (c+d x)}}+\frac {3 \sqrt {3-2 \cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |-4\right ) \sqrt {\sec (c+d x)}}{d \sqrt {2-3 \sec (c+d x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 68, normalized size = 0.63 \begin {gather*} -\frac {\sqrt {3-2 \cos (c+d x)} \left (E\left (\left .\frac {1}{2} (c+d x)\right |-4\right )-3 F\left (\left .\frac {1}{2} (c+d x)\right |-4\right )\right ) \sqrt {\sec (c+d x)}}{d \sqrt {2-3 \sec (c+d x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[1/(Sqrt[2 - 3*Sec[c + d*x]]*Sqrt[Sec[c + d*x]]),x]

[Out]

-((Sqrt[3 - 2*Cos[c + d*x]]*(EllipticE[(c + d*x)/2, -4] - 3*EllipticF[(c + d*x)/2, -4])*Sqrt[Sec[c + d*x]])/(d
*Sqrt[2 - 3*Sec[c + d*x]]))

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 404 vs. \(2 (146 ) = 292\).
time = 0.62, size = 405, normalized size = 3.75

method result size
default \(-\frac {\left (2 i \cos \left (d x +c \right ) \EllipticF \left (\frac {i \left (-1+\cos \left (d x +c \right )\right ) \sqrt {5}}{\sin \left (d x +c \right )}, \frac {\sqrt {5}}{5}\right ) \sqrt {2}\, \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \sqrt {-\frac {2 \left (2 \cos \left (d x +c \right )-3\right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {5}-5 i \cos \left (d x +c \right ) \EllipticE \left (\frac {i \left (-1+\cos \left (d x +c \right )\right ) \sqrt {5}}{\sin \left (d x +c \right )}, \frac {\sqrt {5}}{5}\right ) \sqrt {2}\, \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \sqrt {-\frac {2 \left (2 \cos \left (d x +c \right )-3\right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {5}+2 i \EllipticF \left (\frac {i \left (-1+\cos \left (d x +c \right )\right ) \sqrt {5}}{\sin \left (d x +c \right )}, \frac {\sqrt {5}}{5}\right ) \sqrt {5}\, \sqrt {2}\, \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \sqrt {-\frac {2 \left (2 \cos \left (d x +c \right )-3\right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-5 i \EllipticE \left (\frac {i \left (-1+\cos \left (d x +c \right )\right ) \sqrt {5}}{\sin \left (d x +c \right )}, \frac {\sqrt {5}}{5}\right ) \sqrt {5}\, \sqrt {2}\, \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \sqrt {-\frac {2 \left (2 \cos \left (d x +c \right )-3\right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+20 \left (\cos ^{2}\left (d x +c \right )\right )-50 \cos \left (d x +c \right )+30\right ) \sqrt {\frac {2 \cos \left (d x +c \right )-3}{\cos \left (d x +c \right )}}}{10 d \sqrt {\frac {1}{\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \left (2 \cos \left (d x +c \right )-3\right )}\) \(405\)
risch \(-\frac {i \left ({\mathrm e}^{2 i \left (d x +c \right )}-3 \,{\mathrm e}^{i \left (d x +c \right )}+1\right )}{d \sqrt {\frac {{\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}}\, \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) \sqrt {\frac {{\mathrm e}^{2 i \left (d x +c \right )}-3 \,{\mathrm e}^{i \left (d x +c \right )}+1}{{\mathrm e}^{2 i \left (d x +c \right )}+1}}}-\frac {i \left (-\frac {2 \left ({\mathrm e}^{2 i \left (d x +c \right )}-3 \,{\mathrm e}^{i \left (d x +c \right )}+1\right )}{\sqrt {{\mathrm e}^{i \left (d x +c \right )} \left ({\mathrm e}^{2 i \left (d x +c \right )}-3 \,{\mathrm e}^{i \left (d x +c \right )}+1\right )}}+\frac {2 \left (\frac {\sqrt {5}}{2}-\frac {3}{2}\right ) \sqrt {-\frac {{\mathrm e}^{i \left (d x +c \right )}-\frac {3}{2}+\frac {\sqrt {5}}{2}}{\frac {3}{2}-\frac {\sqrt {5}}{2}}}\, \sqrt {-5 \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {3}{2}-\frac {\sqrt {5}}{2}\right ) \sqrt {5}}\, \sqrt {\frac {{\mathrm e}^{i \left (d x +c \right )}}{\frac {3}{2}-\frac {\sqrt {5}}{2}}}\, \left (-\sqrt {5}\, \EllipticE \left (\sqrt {-\frac {{\mathrm e}^{i \left (d x +c \right )}-\frac {3}{2}+\frac {\sqrt {5}}{2}}{\frac {3}{2}-\frac {\sqrt {5}}{2}}}, \frac {i \sqrt {5}\, \sqrt {\left (\frac {3}{2}-\frac {\sqrt {5}}{2}\right ) \sqrt {5}}}{5}\right )+\left (\frac {3}{2}+\frac {\sqrt {5}}{2}\right ) \EllipticF \left (\sqrt {-\frac {{\mathrm e}^{i \left (d x +c \right )}-\frac {3}{2}+\frac {\sqrt {5}}{2}}{\frac {3}{2}-\frac {\sqrt {5}}{2}}}, \frac {i \sqrt {5}\, \sqrt {\left (\frac {3}{2}-\frac {\sqrt {5}}{2}\right ) \sqrt {5}}}{5}\right )\right )}{5 \sqrt {{\mathrm e}^{3 i \left (d x +c \right )}-3 \,{\mathrm e}^{2 i \left (d x +c \right )}+{\mathrm e}^{i \left (d x +c \right )}}}\right ) \sqrt {{\mathrm e}^{i \left (d x +c \right )} \left ({\mathrm e}^{2 i \left (d x +c \right )}-3 \,{\mathrm e}^{i \left (d x +c \right )}+1\right )}}{d \sqrt {\frac {{\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}}\, \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) \sqrt {\frac {{\mathrm e}^{2 i \left (d x +c \right )}-3 \,{\mathrm e}^{i \left (d x +c \right )}+1}{{\mathrm e}^{2 i \left (d x +c \right )}+1}}}\) \(535\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(2-3*sec(d*x+c))^(1/2)/sec(d*x+c)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/10/d*(2*I*cos(d*x+c)*EllipticF(I*(-1+cos(d*x+c))*5^(1/2)/sin(d*x+c),1/5*5^(1/2))*2^(1/2)*(1/(1+cos(d*x+c)))
^(1/2)*(-2*(2*cos(d*x+c)-3)/(1+cos(d*x+c)))^(1/2)*sin(d*x+c)*5^(1/2)-5*I*cos(d*x+c)*EllipticE(I*(-1+cos(d*x+c)
)*5^(1/2)/sin(d*x+c),1/5*5^(1/2))*2^(1/2)*(1/(1+cos(d*x+c)))^(1/2)*(-2*(2*cos(d*x+c)-3)/(1+cos(d*x+c)))^(1/2)*
sin(d*x+c)*5^(1/2)+2*I*EllipticF(I*(-1+cos(d*x+c))*5^(1/2)/sin(d*x+c),1/5*5^(1/2))*5^(1/2)*2^(1/2)*(1/(1+cos(d
*x+c)))^(1/2)*(-2*(2*cos(d*x+c)-3)/(1+cos(d*x+c)))^(1/2)*sin(d*x+c)-5*I*EllipticE(I*(-1+cos(d*x+c))*5^(1/2)/si
n(d*x+c),1/5*5^(1/2))*5^(1/2)*2^(1/2)*(1/(1+cos(d*x+c)))^(1/2)*(-2*(2*cos(d*x+c)-3)/(1+cos(d*x+c)))^(1/2)*sin(
d*x+c)+20*cos(d*x+c)^2-50*cos(d*x+c)+30)*((2*cos(d*x+c)-3)/cos(d*x+c))^(1/2)/(1/cos(d*x+c))^(1/2)/sin(d*x+c)/(
2*cos(d*x+c)-3)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(2-3*sec(d*x+c))^(1/2)/sec(d*x+c)^(1/2),x, algorithm="maxima")

[Out]

integrate(1/(sqrt(-3*sec(d*x + c) + 2)*sqrt(sec(d*x + c))), x)

________________________________________________________________________________________

Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.76, size = 95, normalized size = 0.88 \begin {gather*} \frac {-i \, {\rm weierstrassPInverse}\left (8, 4, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right ) - 1\right ) + i \, {\rm weierstrassPInverse}\left (8, 4, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right ) - 1\right ) + i \, {\rm weierstrassZeta}\left (8, 4, {\rm weierstrassPInverse}\left (8, 4, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right ) - 1\right )\right ) - i \, {\rm weierstrassZeta}\left (8, 4, {\rm weierstrassPInverse}\left (8, 4, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right ) - 1\right )\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(2-3*sec(d*x+c))^(1/2)/sec(d*x+c)^(1/2),x, algorithm="fricas")

[Out]

(-I*weierstrassPInverse(8, 4, cos(d*x + c) + I*sin(d*x + c) - 1) + I*weierstrassPInverse(8, 4, cos(d*x + c) -
I*sin(d*x + c) - 1) + I*weierstrassZeta(8, 4, weierstrassPInverse(8, 4, cos(d*x + c) + I*sin(d*x + c) - 1)) -
I*weierstrassZeta(8, 4, weierstrassPInverse(8, 4, cos(d*x + c) - I*sin(d*x + c) - 1)))/d

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\sqrt {2 - 3 \sec {\left (c + d x \right )}} \sqrt {\sec {\left (c + d x \right )}}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(2-3*sec(d*x+c))**(1/2)/sec(d*x+c)**(1/2),x)

[Out]

Integral(1/(sqrt(2 - 3*sec(c + d*x))*sqrt(sec(c + d*x))), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(2-3*sec(d*x+c))^(1/2)/sec(d*x+c)^(1/2),x, algorithm="giac")

[Out]

integrate(1/(sqrt(-3*sec(d*x + c) + 2)*sqrt(sec(d*x + c))), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{\sqrt {2-\frac {3}{\cos \left (c+d\,x\right )}}\,\sqrt {\frac {1}{\cos \left (c+d\,x\right )}}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/((2 - 3/cos(c + d*x))^(1/2)*(1/cos(c + d*x))^(1/2)),x)

[Out]

int(1/((2 - 3/cos(c + d*x))^(1/2)*(1/cos(c + d*x))^(1/2)), x)

________________________________________________________________________________________